<%--
    Document   : DatasetViewer
    Created on : Apr 28, 2010, 10:17:19 AM
    Author     : dakhoa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
        <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Dataset Viewer</title>
        <jsp:include page="../include/header.jsp" />

        <script type="text/javascript">
            $(function() {
                $("#tabs").tabs({
                    ajaxOptions: {
                        error: function(xhr, status, index, anchor) {
                            $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo.");
                        } ,
                        beforeSend : function(xhr) {
                            deleteInfoMsg()
                            showOverlay(false, window.parent, true);
                        }
                    }
                });

                $.ajaxSetup({
                    url: "datasetViewer.jsp"
                });

                $('#countryCB').click(function() {
                    //    $("ul.topnav > li")

                    $( "td:nth-child(1), td:nth-child(1)").toggle();
                });

                $('#languageCB').click(function() {
                    $('td:nth-child(2),th:nth-child(2)').toggle();
                });

                $('#displayNameCB').click(function() {
                    $('td:nth-child(3),th:nth-child(3)').toggle();
                });

            });

           

            <%--    function onRowSelect(rowValue) {
                    var vals = rowValue.split(",");
                    $.ajax({
                        type: "GET",
                        data: {'action': 'selectRow', 'tableId' : vals[0], 'rowId' : vals[1]},
                        contentType: "application/text; charset=utf-8",
                        dataType: "text",
                        beforeSend : function(xhr) {
                            xhr.setRequestHeader('AJAX_REQUEST', 'true');
                        },
                        success: function(msg) {
                            $('#bundleOwnersBtn').attr("disabled", (msg == "true" ? true : false));
                        }
                    });
                }--%>

            <%--    function onBundleBtnClick() {
                    $.ajax({
                        url: "datasetViewerOpt3.jsp",
                        type: "GET",
                        data: {'_action': 'onBundleBtnClick'},
                        contentType: "application/text; charset=utf-8",
                        dataType: "text",

                        beforeSend : function(xhr) {
                            xhr.setRequestHeader('AJAX_REQUEST', 'true');
                            showOverlay(false, window.parent, true);
                        },
                        success: function(msg) {
                            if(msg.indexOf("ERROR") != -1) {
                                hideOverlay();
                                showMsg(msg.split("#")[1], 'warn')

                            } else {
                                var params = msg.split("#");
                                popUpNewWin("datasetViewer.jsp?_flowId=${flowScope._flowId}", 1000, 1000,"Dataset Viewer");
                            }
                        }
                    });
                }--%>

                    function showMsg(msg, type) {
                        var styleClass = 'infoMsg'
           
                        document.getElementById("msgTd").className = 'allMessages'
                        document.getElementById("msgTd").innerHTML = "<span id='infoSpan' class=' " + styleClass + "'>"+ msg + "</span>" ;
                    }

                    function deleteInfoMsg() {
                        document.getElementById("msgTd").innerHTML = null;
                        document.getElementById("msgTd").className = null;
                    }

        </script>

    </head>
    <body>
        <form id="theForm" method="post">
            <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">
                <tr>
                    <td valign="top" nowrap="">
                        <span class="appHeading2"><b>Dataset Viewer</b></span>
                    </td>
                    <td valign="bottom" align="right" style="padding-bottom: 8px;">
                        <jsp:include page="./help.jsp" />
                    </td>
                </tr>
                <tr>
                    <td width="100%" colspan="2">
                        <jsp:include page="./menubar.jsp" />
                    </td>
                </tr>
            </table>

            <table rules="none" cellspacing="0" cellpadding="0" border="1" style="width: 100%;" id="pgdMain">
                <tbody>
                    <tr>
                        <td class="mainContainer">
                            <div id="_id13__xc_">
                                <div style="margin-top: 5px;">
                                </div>
                            </div>
                            <span id="_id13">
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="mainContainer">
                            <table width="100%" border="0" >
                                <tbody>
                                    <tr>
                                        <td  width="100%" height="11" id="msgTd">

                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="mainContainer">
                            <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">
                                <tbody>
                                    <tr>
                                        <td height="11">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td class="mainContainer">
                            <table width="100%" cellspacing="5px" cellpadding="5px" class="tabPage" id="tabPage">
                                <tbody>
                                    <tr>
                                        <td>
                                            <table cellspacing="0" cellpadding="0" border="0" summary="">
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <span class="paramName">Step 3 of 3
                                                            </span>
                                                        </td>
                                                        <td>
                                                            <input type="hidden" value="3" name="_id21" id="_id21">
                                                        </td>
                                                        <td>
                                                        </td><td>
                                                            <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id23__xc_">
                                                                <tbody>
                                                                    <tr>
                                                                        <td nowrap="" >
                                                                            <span class="paramName" >
                                                                                &nbsp;&nbsp;&nbsp;Model
                                                                            </span>
                                                                        </td>
                                                                        <td width="12">
                                                                        </td>
                                                                        <td valign="top" nowrap="">
                                                                            <span class="paramName">
                                                                                &nbsp;<c:out value="${airplainModel}"/>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table></td><td>
                                                        </td><td>
                                                            <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id26__xc_">
                                                                <tbody>
                                                                    <tr>
                                                                        <td nowrap="" >
                                                                            <span class="paramName" >
                                                                                &nbsp;&nbsp;&nbsp;Data Source
                                                                            </span>
                                                                        </td>
                                                                        <td width="12">
                                                                        </td>
                                                                        <td valign="top" nowrap="">
                                                                            <span class="paramName"><c:out value="${dataSource}"/>
                                                                            </span></td>
                                                                    </tr>
                                                                </tbody>
                                                            </table></td><td>
                                                        </td><td>
                                                            <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id29__xc_">
                                                                <tbody>
                                                                    <tr>
                                                                        <td nowrap="" >
                                                                            <span class="paramName" >
                                                                                &nbsp;&nbsp;&nbsp;WBS
                                                                            </span>
                                                                        </td>
                                                                        <td width="12">
                                                                        </td>
                                                                        <td valign="top" nowrap="">
                                                                            <span class="paramName">
                                                                                &nbsp;<c:out value="${wbs}"/>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                        <td>
                                                        </td>
                                                        <td>
                                                            <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id32__xc_">
                                                                <tbody>
                                                                    <tr>
                                                                        <td nowrap="" >
                                                                            <span class="paramName" >
                                                                                &nbsp;&nbsp;&nbsp;Eff
                                                                            </span>
                                                                        </td>
                                                                        <td width="12">
                                                                        </td>
                                                                        <td valign="top" nowrap="">
                                                                            <span class="paramValue" >
                                                                                &nbsp;<c:out value="${eff}"/>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table></td><td>
                                                        </td>
                                                        <td>
                                                            <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id35__xc_">
                                                                <tbody>
                                                                    <tr>
                                                                        <td nowrap="" >
                                                                            <span class="paramName" >
                                                                                &nbsp;&nbsp;&nbsp;Option
                                                                            </span>
                                                                        </td>
                                                                        <td width="12">
                                                                        </td>
                                                                        <td valign="top" nowrap="">
                                                                            <span class="paramName">
                                                                                &nbsp; <c:out value="${option}"/>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                <c:if test="${not empty baseDrawing}">
                                                    <td>
                                                        <table cellspacing="0" cellpadding="0" border="0" summary="" id="_id35__xc_">
                                                            <tbody>
                                                                <tr>
                                                                    <td nowrap="" >
                                                                        <span class="paramName" >
                                                                            &nbsp;&nbsp;&nbsp;Base Drawing
                                                                        </span>
                                                                    </td>
                                                                    <td width="12">
                                                                    </td>
                                                                    <td valign="top" nowrap="">
                                                                        <span class="paramName">
                                                                            &nbsp; <c:out value="${baseDrawing}"/>
                                                                        </span>
                                                                    </td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </td>
                                                </c:if>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <table width="100%"  cellspacing="0" cellpadding="0" border="0" summary="">
                                <tbody>
                                    <tr>
                                        <td width="100%">
                                            <h2>

                                            </h2>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="1px" ></td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <table width="100%" style="background: #F7F7E7;"  cellspacing="0" cellpadding="0" border="0" summary="">
                                <tr>
                                    <td height="1px" ></td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td>

                            <table width="100%" cellspacing="0px" cellpadding="0px" style="background: none repeat scroll 0% 0% white;">
                                <tbody>
                                    <tr>
                                        <td>
                                            <div id="tabs">
                                                <ul>
                                                    <li><a href="datasetViewerData.jsp?action=refresh&tab=1">Base Model / Product Name</a></li>
                                                    <li><a href="datasetViewerData.jsp?action=refresh&tab=2">Equipment</a></li>
                                                    <li><a href="datasetViewerData.jsp?action=refresh&tab=3">Flag Markers</a></li>
                                                    <li><a href="datasetViewerData.jsp?action=refresh&tab=4">ID Points</a></li>
                                                    <li><a href="datasetViewerData.jsp?action=refresh&tab=5">Part Ref / Detail Wkspc</a></li>
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <table cellspacing="0" cellpadding="0" border="0" align="center" summary="">
                                <tbody>
                                    <tr>
                                        <td valign="middle">
                                            <table cellspacing="0" cellpadding="0" border="0" summary="">
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <input type="button" onclick="submitBind('theForm', 'newQuery')" name="query" value="New Query" />
                                                        </td>
                                                        <td>
                                                            &nbsp;&nbsp;
                                                        </td>
                                                        <td>
                                                            <input type="button" onclick="stopFlow()" value="Close"/>
                                                        </td>
                                                        <td>   
                                                            &nbsp;&nbsp;
                                                        </td>
                                                        <td>
                                                            <input type="button" value="Next" onclick="submitBind('theForm', 'next')"/>
                                                        </td>

                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>

    <tr>
        <td class="mainContainer">
            <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">
                <tbody>
                    <tr>
                        <td height="11">

                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>

    <tr>
        <td class="mainContainer">
            <div style="margin-top: 1px;">

            </div>
        </td>
    </tr>

    <tr>
        <td class="mainContainer">
            <table cellspacing="0" cellpadding="0" border="0" summary="">
                <tbody>
                    <tr>
                        <td valign="top">
                            <span style="color: #336699;" >
                                <span title="Required">*</span>&nbsp;Indicates required field
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</tbody>
</table>
</form>
</body>
<jsp:include page="../include/versionFooter.jsp" />
</html>
